package com.musemun.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.security.core.GrantedAuthority;

import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
@ApiModel(value="Role对象", description="")
public class Role implements GrantedAuthority,Serializable {
    private static final long serialVersionUID = 1L;

    public Role(String role) {
        this.role = role;
    }

    @TableId(value = "role")
    private String role;
    @TableId(value = "rid")
    private Integer rid;

    @Override
    public String getAuthority() {
        return role;
    }
}
